#ifndef __number_h__
#define __number_h__ 

#include <stdint.h>

int int_to_zigzag(int n);
int zigzag_to_int(int n);

int64_t int64_to_zigzag(int64_t n);
int64_t zigzag_to_int64(int64_t n);


int pbc_encode32(int number, uint8_t buffer[5]);
int pbc_decode32(uint8_t buffer[5], int *result);
int pbc_encode64(int64_t number, uint8_t buffer[10]);
int pbc_decode64(uint8_t buffer[10], int64_t *result);

int pbc_encodef(float v, uint8_t * buffer);
uint32_t pbc_decodeu32(uint8_t *buffer);



#endif

